package com.atguigu.staservice;

import com.atguigu.commonutils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author shkstart
 * @create 2022-08-14 22:43
 */
//@FeignClient("service-vod")不用熔断机制的写法
//不需要实现类，此接口远程调用：/eduvod/video/removeAiyVideo/{id}..fallback兜底，出错时执行
@FeignClient("service-ucenter")//用于指定从哪个服务(删除视频的服务)中调用功能 ，名称与被调用的服务名保持一致
@Component//防止在其他位置注入CodClient时idea报错
public interface UcenterClient {
    //查询一天的注册人数
    @GetMapping("/educenter/member/countRegister/{day}")
    public R countRegister(@PathVariable("day") String day);
}
